package com.molamil.perilla {

	/**
	 * @author martindyrby
	 */
	public class PerillaOption {
		public var target:Object;
		public var callback:Function;
		public var minimum:Number = 0;
		public var maximum:Number = 1;
		public var midiValue:int;
		public var midiType:int;
		public var midiShortcut:String;
		
		public function PerillaOption(target:Object = null, 
										callback:Function = null, 
										minimum:Number = 0, 
										maximum:Number = 1, 
										midiValue:int = 0, 
										midiType:int = 0, 
										midiShortcut:String = null) {
			this.target = target;
			this.callback = callback;
			this.minimum = minimum;
			this.maximum = maximum;
			this.midiValue = midiValue;
			this.midiType = midiType;
			this.midiShortcut = midiShortcut;
		}
		
		public static function callbackWithShortcut(callback:Function, midiShortcut:String, minimum:Number = 0, maximum:Number = 1) : PerillaOption {
			return new PerillaOption(null, callback, minimum, maximum, 0,0,midiShortcut);
		}
		
		public static function callbackWithMidiNote(callback:Function, midiValue:int, minimum:Number = 0, maximum:Number = 1) : PerillaOption {
			return new PerillaOption(null, callback, minimum, maximum, midiValue, 0, null);
		}
		
		public static function target(target:Object) : PerillaOption {
			return new PerillaOption(target);
		}
	}
}
